<template>
    <view class="container" :style="{ display: visible ? 'block' : 'none' }">
        <header-bar :config="config"></header-bar>
    </view>
</template>

<script>
export default {
    components: {},
    props: {
        visible: {
            type: Boolean,
            default: false,
        },
    },
    watch: {
        visible: {
            handler(newVal) {
                this.$nextTick(() => {})
            },
            immediate: true,
        },
    },
    data() {
        return {
            config: {
                title: "商品",
                back: false,
                centerSlot: true,
                rightSlot: true,
                rightBtns: [
                    {
                        id: 1,
                        type: "plusempty",
                    },
                ],
            },
        }
    },
    methods: {
        rightClick(item) {},
    },
}
</script>

<style lang="scss"></style>
